package com.mushroom_street.product.service.imp;

import com.mushroom_street.product.dto.ProductDto;
import com.mushroom_street.product.dao.ProductDao;
import com.mushroom_street.product.service.ProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductServiceImp implements ProductService {
    @Resource
    private ProductDao productDao;

    @Override
    public List<ProductDto> loadProductList() {
        return productDao.selectList(null) ;
    }

    @Override
    public ProductDto loadProductById(String id) {
        return  productDao.selectById(id);
    }
}
